#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
	int x,y,n,a[200],i,s,b,m;
	while((scanf("%d %d",&x,&y))!=EOF)
	{
		for(i=1;i<=x;i++)
		{a[i]=i;}
		n=0;
		s=1;
		b=x;
		m=(s+b)/2;
		while(s<=b)
		{
			if(a[m]==y)
			{
				n++;
				break;
			}
			else if(a[m]>y)
			{
				b=m-1;
				n++;
			}
			else
			{
				s=m+1;
				n++;
			}
			m=(s+b)/2;
		}
		if(s>b)
        printf("0\n");
        else
        printf("%d\n",n);
    }
	return 0;
}
